From d5e665f1c606ce35ec41324d097576e02c2e4ac6 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Thu, 17 Jan 2008 12:05:43 -0700 Subject: [PATCH] [IA64] Remove init_task definition init_task in kernel area shouldn't be referenced. The corresponding address in the identity mapping area should be used. i.e. ia64_tpa(init_task) + PAGE_OFFSET, because ia64_switch_rr7() and vmx_switch_rr7() assume that stack is in indentity mapping area. To make it sure, remove init_task definition. Signed-off-by: Isaku Yamahata --- xen/arch/ia64/linux-xen/head.S | 4 ++++ xen/arch/ia64/xen/idle0_task.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/ia64/linux-xen/head.S b/xen/arch/ia64/linux-xen/head.S index 8e265585cb..270bd92d4e 100644 --- a/xen/arch/ia64/linux-xen/head.S +++ b/xen/arch/ia64/linux-xen/head.S @@ -311,6 +311,10 @@ start_ap: #define isAP p2 // are we an Application Processor? #define isBP p3 // are we the Bootstrap Processor? +#ifdef XEN +# define init_task init_task_mem +#endif + #ifdef CONFIG_SMP /* * Find the init_task for the currently booting CPU. At poweron, and in diff --git a/xen/arch/ia64/xen/idle0_task.c b/xen/arch/ia64/xen/idle0_task.c index da6e1c629d..0708f7d385 100644 --- a/xen/arch/ia64/xen/idle0_task.c +++ b/xen/arch/ia64/xen/idle0_task.c @@ -11,17 +11,19 @@ /* * Initial task structure. * - * We need to make sure that this is properly aligned due to the way process stacks are - * handled. This is done by having a special ".data.init_task" section... + * We need to make sure that this is properly aligned due to the way process + * stacks are handled. + * This is done by having a special ".data.init_task" section... + * + * init_task_mem shouldn't be used directly. the corresponding address in + * the identity mapping area should be used. + * I.e. __va(ia64_tpa(init_task_mem)) should be used. */ union { struct { struct vcpu task; } s; unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; -} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ +} init_task_mem __attribute__((section(".data.init_task"))) = {{ .task = IDLE_VCPU(init_task_mem.s.task) }}; - -EXPORT_SYMBOL(init_task); - -- 2.30.2